Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Azure.Provisioning to latest #6390

Merged
merged 18 commits into from
Oct 28, 2024
Merged

Update Azure.Provisioning to latest #6390

merged 18 commits into from
Oct 28, 2024

Conversation

eerhardt
Copy link
Member

@eerhardt eerhardt commented Oct 21, 2024

Description

Respond to latest renames getting the API ready for GA release.

Fix #6376

I'll use this PR until we get stable versions from @tg-msft.

Also fix an issue when using dashes - in resource names and using AspireV8ResourceNamePropertyResolver. We are prematurely converting the dash to an underscore, and the Azure resource name is not the same as it was in v8. This needs to be fixed together because the APIs we need to fix the issue are being made public in this new Azure.Provisioning version.

Fix #6474

Checklist

  • Is this feature complete?
    • No. Follow-up changes expected. Still need stable versions plus more changes.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
  • Did you add public API?
    • No
  • Does the change make any security assumptions or guarantees?
    • No
  • Does the change require an update in our Aspire docs?
Microsoft Reviewers: Open in CodeFlow

NuGet.config Outdated
@@ -17,6 +17,7 @@
<add key="dotnet9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json" />
<add key="dotnet-libraries" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json" />
<add key="dotnet9-transport" value="https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet9-transport/nuget/v3/index.json" />
<add key="azure-sdk-devfeed" value="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json" />
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These NuGet.config changes won't be merged. We won't merge this PR until the 1.0.0 versions are on nuget.org.

@@ -886,8 +885,7 @@ private void AddContainerRegistryParameters(ContainerAppConfiguration app)
// This is a workaround to handle nested formattable strings until the bug is fixed.
private static BicepValue<string> Interpolate(BicepValueFormattableString text)
{
var formatStringBuilder = new StringBuilder();
var arguments = new List<BicepValue<string>>();
var bicepStringBuilder = new BicepStringBuilder();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI - @davidfowl. We aren't able to get rid of our Format string parsing code from ReferenceExpression. But we are able to use the new BicepStringBuilder here.

Copy link
Member Author

@eerhardt eerhardt Oct 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to simplify the BicepValueFormattableString class. No need for it to inherit from FormattableString.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be able to if you move this logic into the caller right?

Copy link
Member Author

@eerhardt eerhardt Oct 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can build up the BicepStringBuilder earlier and not have the BicepValueFormattableString at all. But we will still need to parse the ReferenceExpression.Format string ourselves.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yea, ok.

@eerhardt
Copy link
Member Author

eerhardt commented Oct 22, 2024

Expecting 1 test failure due to Azure/azure-sdk-for-net#46742

This should be fixed now.

@eerhardt eerhardt marked this pull request as ready for review October 25, 2024 02:08
@eerhardt eerhardt requested a review from radical as a code owner October 25, 2024 02:08
@eerhardt
Copy link
Member Author

This is now ready for review. We have all the changes from the Azure.Provisioning libraries we need for 9.0.0 GA.

@eerhardt
Copy link
Member Author

/backport to release/9.0

Copy link
Contributor

Started backporting to release/9.0: https://github.com/dotnet/aspire/actions/runs/11511183771

@eerhardt
Copy link
Member Author

/backport to release/9.0

Copy link
Contributor

Started backporting to release/9.0: https://github.com/dotnet/aspire/actions/runs/11521283799

…has a dash.

In .NET Aspire 8.x, when the Aspire resource name has dashes, we used those dashes in the Azure resource name. But we are incorrectly converting them to underscores.

Fix dotnet#6474
@eerhardt
Copy link
Member Author

/backport to release/9.0

Copy link
Contributor

Started backporting to release/9.0: https://github.com/dotnet/aspire/actions/runs/11522041527

@eerhardt
Copy link
Member Author

/backport to release/9.0

Copy link
Contributor

Started backporting to release/9.0: https://github.com/dotnet/aspire/actions/runs/11523011977

@eerhardt
Copy link
Member Author

This has all the changes from [release/9.0] Update Azure.Provisioning to latest (dotnet/aspire#6489) merged into it. Looking for an approval so we can merge it into main.

@eerhardt eerhardt enabled auto-merge (squash) October 27, 2024 23:01
@davidfowl
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@davidfowl
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@eerhardt eerhardt merged commit be2a895 into dotnet:main Oct 28, 2024
9 checks passed
@eerhardt eerhardt deleted the UpdateCDK branch October 28, 2024 13:50
@github-actions github-actions bot locked and limited conversation to collaborators Nov 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New Azure SQL API has different naming conventions than Aspire 8 Update to GA version of Azure.Provisioning
3 participants